import type { FC, PropsWithChildren, ReactNode } from 'react';

interface TestComponentProps {
  leftSlot: ReactNode;
  rightSlot: ReactNode;
  title?: string | number | Array<any>;
}
// 函数式编程

export const TestComponent: FC<PropsWithChildren<TestComponentProps>> = ({
  children,
  leftSlot,
  rightSlot,
  title
}) => {
  console.log(2333, title);
  return (
    <div>
      {title}
      {children}
      <hr />
      <p>{leftSlot}</p>
      <hr />
      <h1>{rightSlot}</h1>
    </div>
  );
};
